<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/commons/include/html_doctype.html"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="/commons/page/codegen.jsp"%>
	
<style type="text/css">

#mermbers {
	width: 98%;
    margin: auto;
    margin-top:15px;
}

</style>

<body>
	<!-- 顶部按钮 -->
	<div class="wrapper wrapper-content  animated fadeInRight col-sm-12">
		<div class="">    	
			<div class="jqGrid_wrapper" id="mermbers" >		
				<table id="campusCardGrid" ></table>
				<div id="campusCardPager"></div>
			</div>       	
		</div>
	</div>
	
	<script type="text/javascript">
	   var usernum='${usernum}'; 	
	   
	   //初始化表单
       $(function(){
    	   gridInit();  
       });
              
       function gridInit(){
    	   $("#campusCardGrid").GridList(
					{
						url :  '${ctx}/rdp/CurrentPermission/currentPermission/userPermissionList.htm?usernum='+usernum,
						pager :"#campusCardPager",
						colNames: ['ID','姓名','卡号','卡UID','控制器编号','门号','门名称','开始时间','结束时间'],
				        colModel: [{
				                 	   name:'id',
				                	   index: 'ID',
				                	   hidden:true,
				                	   key:true
				                	}, 
				                	{
					                 	   name:'username',
					                	   index: 'USERNAME'

									},
				                	{
				                 	   name:'studentno',
				                	   index: 'STUDENTNO',
				                	   hidden:true,

									},

									{
				                 	   name:'studentuid',
				                	   index: 'STUDENTUID',
				                	   hidden:true,

									},
									{
				                 	   name:'controllerno',
				                	   index: 'CONTROLLERNO',
				                	   hidden:true,
                                    },
									{
				                 	   name:'doorno',
				                	   index: 'DOORNO',
				                	   hidden:true
                                    },  
									{
 				                 	   name:'doorname',
 				                	   index: 'DOORNAME'
                                    }, 
								    {
				                 	   name:'starttime',
				                	   index: 'STARTTIME',
				                	   formatter:'timestamp'
			                	    }, 
			                	    {
				                 	   name:'endtime',
				                	   index: 'ENDTIME',
				                	   formatter: 'timestamp'
									}
				               ],
					        onSelectRow: function (rowId, status, e) {
					        	
					        },
							//点击题头的checkbox按钮，一键多选
					        onSelectAll:function(rowids,statue){
					        	
					        }						
	
					});
       }
       
       
       var dtFormatter = function (cellValue, options, rowObject) {
		   if(cellValue==null||cellValue==""){
			   return "";
		   }
		   var date = new Date(cellValue);
		   　    y = date.getFullYear();
		   　　m = date.getMonth() + 1;
		  　     d = date.getDate();
		   h = date.getHours() ;
		   f  = date.getMinutes();
		   s  = date. getSeconds();
		    
		   if(m<10){
			   m= '0'+m;
		   }
		   if(d<10){
			   d= '0'+d;
		   }
		   if(h<10){
			   h= '0'+h;
		   }
		   if(f<10){
			   f= '0'+f;
		   }
		   if(s<10){
			   s= '0'+s;
		   }
		   　　return y+"-"+m+"-"+d+" "+h+":"+f+":"+s;

       }


	</script>
	
</body>
</html>